<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>json和字符串转换细节</title>
    <script type="text/javascript">
        window.onload=function () {
            var strDog=" {\"name\":\"jack\",\"age\":2}";
            var JsonDog = JSON.parse(strDog);
            console.log("JsonDog=",JsonDog)
        }
    </script>
</head>
<body>

</body>
</html>